//
//  UITextView+YH.m
//  YHKit
//
//  Created by 林宁宁 on 2021/6/15.
//

#import "UITextView+YH.h"
#import <YHConstant/YHConstant+Method.h>
#import "UIView+YHInputAccessory.h"

@implementation UITextView (YH)

+(void)load{
    yh_swizzleMethod(self, @selector(keyboardAppearance), @selector(yh_keyboardAppearance));
    yh_swizzleMethod(self, @selector(inputAccessoryView), @selector(yh_inputAccessoryView));
}

-(UIKeyboardAppearance)yh_keyboardAppearance{
    return UIKeyboardAppearanceDark;
}

-(UIView *)yh_inputAccessoryView{
    UIView * v = [self yh_inputAccessoryView];
    if(!v){
        [self showAccessoryDown:nil];
        v = [self yh_inputAccessoryView];
    }
    return v;
}

@end
